<template>
  <div class="light">
    <div class="light_btn">霓虹灯效果</div>
  </div>
</template>

<script>
export default {
  name: 'NemoLight'
}
</script>

<style lang="less" scoped>
.light {
  width: 100%;
  height: 200px;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  &_btn {
    width: 200px;
    height: 50px;
    color: chartreuse;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: light-btn-shadow 2s infinite alternate; /* infinite 无限次播放  alternate正反交替播放 */
  }
}

/* 定义动画 */
@keyframes light-btn-shadow {
  100% {
    color: #000;
    background-color: chartreuse;
    box-shadow: 0px 0px 200px 0px chartreuse, 0px 0px 50px 0px chartreuse,
      0px 0px 25px 0px chartreuse, 0px 0px 5px 0px chartreuse;
  }
}
</style>
